﻿using System.Collections.Generic;

namespace PoliticalClassifier.Support
{
    /// <summary>
    /// Interface to define the primitive functionality of CandidateManager.
    /// </summary>
    public interface ICandidateManager : IEnumerable<ICandidate>
    {
        /// <summary>
        /// Add a new candidate in a manager.
        /// </summary>
        /// <param name="candidate">ICandidate object</param>
        /// <returns>zero based index location of the added candidate.</returns>
        int AddCandidate(ICandidate candidate);
        /// <summary>
        /// Remove a candidate from the manager
        /// </summary>
        /// <param name="index">zero based index location of the candiate.</param>
        void RemoveCandidate(int index);

        /// <summary>
        /// Returns the number of candidates in a manager
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Gets the candidate at the given index.
        /// </summary>
        /// <param name="index">The index to get the candidate at.</param>
        /// <returns>The candidate.</returns>
        ICandidate this[int index] { get; }
    }
}
